import React from 'react';
import { useChangeTheme, useTheme } from '../../state/user/hooks';
import { Button } from 'antd';
import {
    HeaderWrapper
} from './style';

type IProps = {
    
}

const Header:React.FC<IProps> = () => {
    const change = useChangeTheme()
    const theme = useTheme()
    return (
        <HeaderWrapper>
            {theme}
            <Button onClick={() => {
                change('Dark')
            }}>切换黑夜主题</Button>
            <Button onClick={() => {
                change('Days')
            }}>切换白天主题</Button>
        </HeaderWrapper>
    )
} 

export default Header